/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * VentanaPrincipal.java
 *
 * Created on 11/03/2012, 03:57:10 PM
 */
package co.edu.eam.clinica.vista.gui.common;

import co.edu.eam.clinica.vista.gui.consulta.PanelAgenda;
import co.edu.eam.clinica.vista.gui.consulta.PanelAsignarCita;
import co.edu.eam.clinica.vista.gui.consulta.PanelBuscarCitas;
import co.edu.eam.clinica.vista.gui.historiaclinica.PanelBuscarHistoriaClinica;
import co.edu.eam.clinica.vista.gui.historiaclinica.PanelHIstoriaNueva;
import co.edu.eam.clinica.vista.gui.inventario.PanelSalidaEntrada;
import co.edu.eam.clinica.vista.gui.paciente.PanelCrearPaciente;
import co.edu.eam.clinica.vista.gui.paciente.PanelDirecorio;
import co.edu.eam.clinica.vista.gui.varios.PanelCruds;
import co.edu.eam.clinica.vista.gui.varios.PanelFuncionario;
import java.beans.PropertyVetoException;
import java.util.logging.Level;
import java.util.logging.Logger;



/**
 * 
 * @author Camilo Andres
 */
public class VentanaPrincipal extends javax.swing.JFrame {

	/** Creates new form VentanaPrincipal */
	public VentanaPrincipal() {
		initComponents();

		/*
		 * mnuCitas.setNombreComponente("vistaprincipal.menuCitas");
		 * mnuHistoriaClinica
		 * .setNombreComponente("vistaprincipal.menuHistoriaClinica");
		 * mnuItemBuscarCitas
		 * .setNombreComponente("vistaprincipal.mnuItemBuscarCitas");
		 * mnuItemCrearHistoria
		 * .setNombreComponente("vistaprincipal.mnuItemCrearHistoria");
		 * mnuItemVerHistoria
		 * .setNombreComponente("vistaprincipal.mnuItemVerHistoria");
		 * mnuKardex.setNombreComponente("vistaprincipal.mnuKardex");
		 * mnuMedico.setNombreComponente("vistaprincipal.mnuMedico");
		 * mnuVerAgenda.setNombreComponente("vistaprincipal.mnuVerAgenda");
		 */
		

	}

	
	/**
	 * This method is called from within the constructor to initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is always
	 * regenerated by the Form Editor.
	 */
	@SuppressWarnings("unchecked")
	// <editor-fold defaultstate="collapsed"
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        dpPanel = new javax.swing.JDesktopPane();
        toolbarMedico = new javax.swing.JToolBar();
        jbveragenda = new javax.swing.JButton();
        jbkardex = new javax.swing.JButton();
        jBCrearHC = new javax.swing.JButton();
        jbverHC = new javax.swing.JButton();
        jbcitas = new javax.swing.JButton();
        jbgenerarReporte = new javax.swing.JButton();
        jbIncapacidades = new javax.swing.JButton();
        toolBarSec = new javax.swing.JToolBar();
        jBAsignarCita = new javax.swing.JButton();
        jBInventario = new javax.swing.JButton();
        jBCrearPac = new javax.swing.JButton();
        jBDirectorio = new javax.swing.JButton();
        jBCuentasPorPagar = new javax.swing.JButton();
        jBEgreso = new javax.swing.JButton();
        jBFactua = new javax.swing.JButton();
        jBReciboCaja = new javax.swing.JButton();
        jRResolucionDian = new javax.swing.JButton();
        jBCrearMedicamento = new javax.swing.JButton();
        jBDefuncion = new javax.swing.JButton();
        mnuBarOncologos = new javax.swing.JMenuBar();
        mnuMedico = new javax.swing.JMenu();
        mnuVerAgenda = new javax.swing.JMenuItem();
        mnuHistoriaClinica = new javax.swing.JMenu();
        mnuItemCrearHistoria = new javax.swing.JMenuItem();
        mnuItemVerHistoria = new javax.swing.JMenuItem();
        mnuCitas = new javax.swing.JMenu();
        mnuItemBuscarCitas = new javax.swing.JMenuItem();
        mnuReportes = new javax.swing.JMenuItem();
        mnuIncapacidades = new javax.swing.JMenuItem();
        mnuItemProtocolo = new javax.swing.JMenuItem();
        mnuSecre = new javax.swing.JMenu();
        mnuItemAsignarCita = new javax.swing.JMenuItem();
        mnuInventario = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jItemCrearPac = new javax.swing.JMenuItem();
        jItemDirectorio = new javax.swing.JMenuItem();
        jItemCuentasPagar = new javax.swing.JMenuItem();
        mnuEgresos = new javax.swing.JMenuItem();
        mnuItemFActura = new javax.swing.JMenuItem();
        jItemReciboCaja = new javax.swing.JMenuItem();
        jItemResolucion = new javax.swing.JMenuItem();
        jItemCrearMed = new javax.swing.JMenuItem();
        jItemDefuncion = new javax.swing.JMenuItem();
        mnuFunc = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        toolbarMedico.setRollover(true);

        jbveragenda.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/24x24/directorio-de-texto-icono-8249-32.png"))); // NOI18N
        jbveragenda.setFocusable(false);
        jbveragenda.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jbveragenda.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jbveragenda.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbveragendaActionPerformed(evt);
            }
        });
        toolbarMedico.add(jbveragenda);

        jbkardex.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/24x24/medicamento.jpg"))); // NOI18N
        jbkardex.setFocusable(false);
        jbkardex.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jbkardex.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jbkardex.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbkardexActionPerformed(evt);
            }
        });
        toolbarMedico.add(jbkardex);

        jBCrearHC.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/24x24/historiaclinica.jpg"))); // NOI18N
        jBCrearHC.setFocusable(false);
        jBCrearHC.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jBCrearHC.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jBCrearHC.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBCrearHCActionPerformed(evt);
            }
        });
        toolbarMedico.add(jBCrearHC);

        jbverHC.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/24x24/ver.jpg"))); // NOI18N
        jbverHC.setFocusable(false);
        jbverHC.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jbverHC.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jbverHC.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbverHCActionPerformed(evt);
            }
        });
        toolbarMedico.add(jbverHC);

        jbcitas.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/24x24/ver agenda.jpg"))); // NOI18N
        jbcitas.setFocusable(false);
        jbcitas.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jbcitas.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jbcitas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbcitasActionPerformed(evt);
            }
        });
        toolbarMedico.add(jbcitas);

        jbgenerarReporte.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/24x24/generar.jpg"))); // NOI18N
        jbgenerarReporte.setFocusable(false);
        jbgenerarReporte.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jbgenerarReporte.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jbgenerarReporte.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbgenerarReporteActionPerformed(evt);
            }
        });
        toolbarMedico.add(jbgenerarReporte);

        jbIncapacidades.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/24x24/Edit.png"))); // NOI18N
        jbIncapacidades.setFocusable(false);
        jbIncapacidades.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jbIncapacidades.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jbIncapacidades.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbIncapacidadesActionPerformed(evt);
            }
        });
        toolbarMedico.add(jbIncapacidades);

        toolBarSec.setRollover(true);

        jBAsignarCita.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/24x24/asignarcita.jpg"))); // NOI18N
        jBAsignarCita.setFocusable(false);
        jBAsignarCita.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jBAsignarCita.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jBAsignarCita.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBAsignarCitaActionPerformed(evt);
            }
        });
        toolBarSec.add(jBAsignarCita);

        jBInventario.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/24x24/medicamento.jpg"))); // NOI18N
        jBInventario.setFocusable(false);
        jBInventario.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jBInventario.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jBInventario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBInventarioActionPerformed(evt);
            }
        });
        toolBarSec.add(jBInventario);

        jBCrearPac.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/24x24/lista-icono-5482-32.png"))); // NOI18N
        jBCrearPac.setFocusable(false);
        jBCrearPac.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jBCrearPac.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jBCrearPac.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBCrearPacActionPerformed(evt);
            }
        });
        toolBarSec.add(jBCrearPac);

        jBDirectorio.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/24x24/directorio-de-texto-icono-8249-32.png"))); // NOI18N
        jBDirectorio.setFocusable(false);
        jBDirectorio.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jBDirectorio.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jBDirectorio.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBDirectorioActionPerformed(evt);
            }
        });
        toolBarSec.add(jBDirectorio);

        jBCuentasPorPagar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/24x24/simulador-de-dinero-icono-9794-32.png"))); // NOI18N
        jBCuentasPorPagar.setFocusable(false);
        jBCuentasPorPagar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jBCuentasPorPagar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jBCuentasPorPagar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBCuentasPorPagarActionPerformed(evt);
            }
        });
        toolBarSec.add(jBCuentasPorPagar);

        jBEgreso.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/24x24/dinero-seguro-icono-6456-32.png"))); // NOI18N
        jBEgreso.setFocusable(false);
        jBEgreso.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jBEgreso.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jBEgreso.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBEgresoActionPerformed(evt);
            }
        });
        toolBarSec.add(jBEgreso);

        jBFactua.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/24x24/dinero-en-efectivo-cartera-monedero-icono-7127-32.png"))); // NOI18N
        jBFactua.setFocusable(false);
        jBFactua.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jBFactua.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jBFactua.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBFactuaActionPerformed(evt);
            }
        });
        toolBarSec.add(jBFactua);

        jBReciboCaja.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/24x24/cuenta-icono-6432-32.png"))); // NOI18N
        jBReciboCaja.setFocusable(false);
        jBReciboCaja.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jBReciboCaja.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jBReciboCaja.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBReciboCajaActionPerformed(evt);
            }
        });
        toolBarSec.add(jBReciboCaja);

        jRResolucionDian.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/24x24/editar-el-archivo-de-papel-pluma-icono-5851-32.png"))); // NOI18N
        jRResolucionDian.setFocusable(false);
        jRResolucionDian.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jRResolucionDian.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jRResolucionDian.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRResolucionDianActionPerformed(evt);
            }
        });
        toolBarSec.add(jRResolucionDian);

        jBCrearMedicamento.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/24x24/Pills.png"))); // NOI18N
        jBCrearMedicamento.setFocusable(false);
        jBCrearMedicamento.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jBCrearMedicamento.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jBCrearMedicamento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBCrearMedicamentoActionPerformed(evt);
            }
        });
        toolBarSec.add(jBCrearMedicamento);

        jBDefuncion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/24x24/doctor.png"))); // NOI18N
        jBDefuncion.setFocusable(false);
        jBDefuncion.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jBDefuncion.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jBDefuncion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBDefuncionActionPerformed(evt);
            }
        });
        toolBarSec.add(jBDefuncion);

        mnuMedico.setText("Medico");

        mnuVerAgenda.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        mnuVerAgenda.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/16x16/directorio-de-texto-icono-8249-16.png"))); // NOI18N
        mnuVerAgenda.setText("Ver Agenda");
        mnuVerAgenda.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuVerAgendaActionPerformed(evt);
            }
        });
        mnuMedico.add(mnuVerAgenda);

        mnuHistoriaClinica.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/16x16/historiaclinica.jpg"))); // NOI18N
        mnuHistoriaClinica.setText("Historia Clinica");

        mnuItemCrearHistoria.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        mnuItemCrearHistoria.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/16x16/CrearHC.jpg"))); // NOI18N
        mnuItemCrearHistoria.setText("Crear Historia");
        mnuItemCrearHistoria.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuItemCrearHistoriaActionPerformed(evt);
            }
        });
        mnuHistoriaClinica.add(mnuItemCrearHistoria);

        mnuItemVerHistoria.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        mnuItemVerHistoria.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/16x16/ver.jpg"))); // NOI18N
        mnuItemVerHistoria.setText("Ver Historia");
        mnuItemVerHistoria.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuItemVerHistoriaActionPerformed(evt);
            }
        });
        mnuHistoriaClinica.add(mnuItemVerHistoria);

        mnuMedico.add(mnuHistoriaClinica);

        mnuCitas.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/16x16/ver agenda.jpg"))); // NOI18N
        mnuCitas.setText("Citas");

        mnuItemBuscarCitas.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_B, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        mnuItemBuscarCitas.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/16x16/buscar.jpg"))); // NOI18N
        mnuItemBuscarCitas.setText("Buscar Citas");
        mnuItemBuscarCitas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuItemBuscarCitasActionPerformed(evt);
            }
        });
        mnuCitas.add(mnuItemBuscarCitas);

        mnuMedico.add(mnuCitas);

        mnuReportes.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/16x16/generar.jpg"))); // NOI18N
        mnuReportes.setText("Generar Reportes");
        mnuReportes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuReportesActionPerformed(evt);
            }
        });
        mnuMedico.add(mnuReportes);

        mnuIncapacidades.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_I, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        mnuIncapacidades.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/16x16/Edit.png"))); // NOI18N
        mnuIncapacidades.setText("Incapacidades");
        mnuIncapacidades.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuIncapacidadesActionPerformed(evt);
            }
        });
        mnuMedico.add(mnuIncapacidades);

        mnuItemProtocolo.setText("Protocolos");
        mnuItemProtocolo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuItemProtocoloActionPerformed(evt);
            }
        });
        mnuMedico.add(mnuItemProtocolo);

        mnuBarOncologos.add(mnuMedico);

        mnuSecre.setText("Secretaria");

        mnuItemAsignarCita.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.CTRL_MASK));
        mnuItemAsignarCita.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/16x16/asignarcita.jpg"))); // NOI18N
        mnuItemAsignarCita.setText("Asignar Cita");
        mnuItemAsignarCita.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuItemAsignarCitaActionPerformed(evt);
            }
        });
        mnuSecre.add(mnuItemAsignarCita);

        mnuInventario.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_I, java.awt.event.InputEvent.CTRL_MASK));
        mnuInventario.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/16x16/medicamento.jpg"))); // NOI18N
        mnuInventario.setText("Inventario");
        mnuInventario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuInventarioActionPerformed(evt);
            }
        });
        mnuSecre.add(mnuInventario);

        jMenu2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/16x16/paciente.png"))); // NOI18N
        jMenu2.setText("Paciente");

        jItemCrearPac.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.CTRL_MASK));
        jItemCrearPac.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/16x16/lista-icono-5482-32.png"))); // NOI18N
        jItemCrearPac.setText("Crear,Buscar, Editar");
        jItemCrearPac.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jItemCrearPacActionPerformed(evt);
            }
        });
        jMenu2.add(jItemCrearPac);

        jItemDirectorio.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, java.awt.event.InputEvent.CTRL_MASK));
        jItemDirectorio.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/16x16/directorio-de-texto-icono-8249-16.png"))); // NOI18N
        jItemDirectorio.setText("Directorio");
        jItemDirectorio.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jItemDirectorioActionPerformed(evt);
            }
        });
        jMenu2.add(jItemDirectorio);

        mnuSecre.add(jMenu2);

        jItemCuentasPagar.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.CTRL_MASK));
        jItemCuentasPagar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/16x16/simulador-de-dinero-icono-9794-16.png"))); // NOI18N
        jItemCuentasPagar.setText("CRUDs Varios");
        jItemCuentasPagar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jItemCuentasPagarActionPerformed(evt);
            }
        });
        mnuSecre.add(jItemCuentasPagar);

        mnuEgresos.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.CTRL_MASK));
        mnuEgresos.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/16x16/dinero-seguro-icono-6456-16.png"))); // NOI18N
        mnuEgresos.setText("Egresos");
        mnuEgresos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuEgresosActionPerformed(evt);
            }
        });
        mnuSecre.add(mnuEgresos);

        mnuItemFActura.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, java.awt.event.InputEvent.CTRL_MASK));
        mnuItemFActura.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/16x16/dinero-en-efectivo-cartera-monedero-icono-7127-16.png"))); // NOI18N
        mnuItemFActura.setText("Facturas");
        mnuItemFActura.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuItemFActuraActionPerformed(evt);
            }
        });
        mnuSecre.add(mnuItemFActura);

        jItemReciboCaja.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        jItemReciboCaja.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/16x16/cuenta-icono-6432-32 - copia.png"))); // NOI18N
        jItemReciboCaja.setText("REcibo de caja");
        jItemReciboCaja.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jItemReciboCajaActionPerformed(evt);
            }
        });
        mnuSecre.add(jItemReciboCaja);

        jItemResolucion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/16x16/editar-el-archivo-de-papel-pluma-icono-5851-32 - copia.png"))); // NOI18N
        jItemResolucion.setText("Resoluciones DIAN");
        jItemResolucion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jItemResolucionActionPerformed(evt);
            }
        });
        mnuSecre.add(jItemResolucion);

        jItemCrearMed.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_M, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        jItemCrearMed.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/16x16/Pills.png"))); // NOI18N
        jItemCrearMed.setText("Crear Medicamento");
        jItemCrearMed.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jItemCrearMedActionPerformed(evt);
            }
        });
        mnuSecre.add(jItemCrearMed);

        jItemDefuncion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/torresquintero/oncologos/medico/imagenes/imagenes/16x16/doctor.png"))); // NOI18N
        jItemDefuncion.setText("Registrar Defuncion");
        jItemDefuncion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jItemDefuncionActionPerformed(evt);
            }
        });
        mnuSecre.add(jItemDefuncion);

        mnuFunc.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        mnuFunc.setText("Funcionario");
        mnuFunc.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuFuncActionPerformed(evt);
            }
        });
        mnuSecre.add(mnuFunc);

        mnuBarOncologos.add(mnuSecre);

        setJMenuBar(mnuBarOncologos);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(toolbarMedico, javax.swing.GroupLayout.DEFAULT_SIZE, 760, Short.MAX_VALUE)
            .addComponent(toolBarSec, javax.swing.GroupLayout.DEFAULT_SIZE, 760, Short.MAX_VALUE)
            .addComponent(dpPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 760, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(toolbarMedico, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(toolBarSec, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(dpPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 390, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

        private void mnuFuncActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuFuncActionPerformed
            // TODO add your handling code here:
            agregarVentana(new PanelFuncionario());
        }//GEN-LAST:event_mnuFuncActionPerformed

    private void jItemCuentasPagarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jItemCuentasPagarActionPerformed
        // TODO add your handling code here:
        agregarVentana(new PanelCruds());
    }//GEN-LAST:event_jItemCuentasPagarActionPerformed

	private void mnuVerAgendaActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_mnuVerAgendaActionPerformed
		// TODO add your handling code here:
		agregarVentana(new PanelAgenda());

	}// GEN-LAST:event_mnuVerAgendaActionPerformed

	private void mnuItemAsignarCitaActionPerformed(
			java.awt.event.ActionEvent evt) {// GEN-FIRST:event_mnuItemAsignarCitaActionPerformed
		// TODO add your handling code here:
		agregarVentana(new PanelAsignarCita());
	}// GEN-LAST:event_mnuItemAsignarCitaActionPerformed

	private void mnuInventarioActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_mnuInventarioActionPerformed
		// TODO add your handling code here:
            		agregarVentana(new PanelSalidaEntrada());

	}// GEN-LAST:event_mnuInventarioActionPerformed

	private void jItemCrearPacActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jMenuItem1ActionPerformed
		// TODO add your handling code here:
		agregarVentana(new PanelCrearPaciente());
	}// GEN-LAST:event_jMenuItem1ActionPerformed

	private void mnuItemBuscarCitasActionPerformed(
			java.awt.event.ActionEvent evt) {// GEN-FIRST:event_mnuItemBuscarCitasActionPerformed
		// TODO add your handling code here:
		agregarVentana(new PanelBuscarCitas());
	}// GEN-LAST:event_mnuItemBuscarCitasActionPerformed

	

	private void mnuItemVerHistoriaActionPerformed(
			java.awt.event.ActionEvent evt) {// GEN-FIRST:event_mnuItemVerHistoriaActionPerformed
		// TODO add your handling code here:
		agregarVentana(new PanelBuscarHistoriaClinica());
	}// GEN-LAST:event_mnuItemVerHistoriaActionPerformed

	private void mnuItemCrearHistoriaActionPerformed(
			java.awt.event.ActionEvent evt) {// GEN-FIRST:event_mnuItemCrearHistoriaActionPerformed
		// TODO add your handling code here:
		agregarVentana(new PanelHIstoriaNueva());

	}// GEN-LAST:event_mnuItemCrearHistoriaActionPerformed

	private void mnuEgresosActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_mnuEgresosActionPerformed
		// TODO add your handling code here:


	}// GEN-LAST:event_mnuEgresosActionPerformed

	private void mnuItemFActuraActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_mnuItemFActuraActionPerformed
		// TODO add your handling code here:
	}// GEN-LAST:event_mnuItemFActuraActionPerformed

	private void jItemReciboCajaActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jMenuItem4ActionPerformed
		// TODO add your handling code here:
	}// GEN-LAST:event_jMenuItem4ActionPerformed

	private void jItemResolucionActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jMenuItem5ActionPerformed
		// TODO add your handling code here:
	}// GEN-LAST:event_jMenuItem5ActionPerformed

	private void jItemCrearMedActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jMenuItem6ActionPerformed
		// TODO add your handling code here:
	}// GEN-LAST:event_jMenuItem6ActionPerformed

	private void mnuReportesActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_mnuReportesActionPerformed
		// TODO add your handling code here:

	}// GEN-LAST:event_mnuReportesActionPerformed

	private void jItemDefuncionActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jMenuItem8ActionPerformed
		// TODO add your handling code here:
	}// GEN-LAST:event_jMenuItem8ActionPerformed

	private void mnuIncapacidadesActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_mnuIncapacidadesActionPerformed
		// TODO add your handling code here:
	}// GEN-LAST:event_mnuIncapacidadesActionPerformed

	private void mnuItemProtocoloActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_mnuItemProtocoloActionPerformed
		// TODO add your handling code here:


	}// GEN-LAST:event_mnuItemProtocoloActionPerformed

	private void jbveragendaActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jbveragendaActionPerformed
		// TODO add your handling code here:
		mnuVerAgendaActionPerformed(null);
	}// GEN-LAST:event_jbveragendaActionPerformed

	private void jbkardexActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jbkardexActionPerformed
		// TODO add your handling code here:

	}// GEN-LAST:event_jbkardexActionPerformed

	private void mnuKardexActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_mnuKardexActionPerformed
		// TODO add your handling code here:
	}// GEN-LAST:event_mnuKardexActionPerformed

	private void jBCrearHCActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jButton3ActionPerformed
		// TODO add your handling code here:
		mnuItemCrearHistoriaActionPerformed(null);
	}// GEN-LAST:event_jButton3ActionPerformed

	private void jbverHCActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jbverHCActionPerformed
		// TODO add your handling code here:
		mnuItemVerHistoriaActionPerformed(null);

	}// GEN-LAST:event_jbverHCActionPerformed

	private void jbcitasActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jbcitasActionPerformed
		// TODO add your handling code here:

		mnuItemBuscarCitasActionPerformed(null);
	}// GEN-LAST:event_jbcitasActionPerformed

	private void jbgenerarReporteActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jbgenerarReporteActionPerformed
		// TODO add your handling code here:

		mnuReportesActionPerformed(null);

	}// GEN-LAST:event_jbgenerarReporteActionPerformed

	private void jbIncapacidadesActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jbIncapacidadesActionPerformed
		// TODO add your handling code here:
		mnuIncapacidadesActionPerformed(null);

	}// GEN-LAST:event_jbIncapacidadesActionPerformed

	private void jBAsignarCitaActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jButton1ActionPerformed
		// TODO add your handling code here:

		mnuItemAsignarCitaActionPerformed(null);
	}// GEN-LAST:event_jButton1ActionPerformed

	private void jBInventarioActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jButton2ActionPerformed
		// TODO add your handling code here:

		mnuInventarioActionPerformed(null);
	}// GEN-LAST:event_jButton2ActionPerformed

	private void jBCrearPacActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jButton4ActionPerformed
		// TODO add your handling code here:
		jItemCrearPacActionPerformed(null);
	}// GEN-LAST:event_jButton4ActionPerformed

	private void jItemDirectorioActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jMenuItem2ActionPerformed
		// TODO add your handling code here:
		agregarVentana(new PanelDirecorio());

	}// GEN-LAST:event_jMenuItem2ActionPerformed

	private void jBCuentasPorPagarActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jButton6ActionPerformed
		// TODO add your handling code here:

		jItemCuentasPagarActionPerformed(null);
	}// GEN-LAST:event_jButton6ActionPerformed

	private void jBEgresoActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jButton7ActionPerformed
		// TODO add your handling code here:

		mnuEgresosActionPerformed(null);
	}// GEN-LAST:event_jButton7ActionPerformed

	private void jBFactuaActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jButton8ActionPerformed
		// TODO add your handling code here:
		mnuItemFActuraActionPerformed(null);
	}// GEN-LAST:event_jButton8ActionPerformed

	private void jBReciboCajaActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jButton9ActionPerformed
		// TODO add your handling code here:

		jItemReciboCajaActionPerformed(null);
	}// GEN-LAST:event_jButton9ActionPerformed

	private void jRResolucionDianActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jButton10ActionPerformed
		// TODO add your handling code here:

		jItemResolucionActionPerformed(null);
	}// GEN-LAST:event_jButton10ActionPerformed

	private void jBCrearMedicamentoActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jButton11ActionPerformed
		// TODO add your handling code here:
		jItemCrearMedActionPerformed(null);
	}// GEN-LAST:event_jButton11ActionPerformed

	private void jBDefuncionActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jButton12ActionPerformed
		// TODO add your handling code here:
		jItemDefuncionActionPerformed(null);
	}// GEN-LAST:event_jButton12ActionPerformed

	private void jBDirectorioActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jButton5ActionPerformed
		jItemDirectorioActionPerformed(null);
	}// GEN-LAST:event_jButton5ActionPerformed

	/**
	 * @todo
	 * @param panel
	 */
	public void agregarVentana(PanelOncologos panel) {
        try {
            InternalFrame vent = new InternalFrame(panel);
            dpPanel.add(vent);
            dpPanel.setSelectedFrame(vent);
            vent.setSelected(true);
        } catch (PropertyVetoException ex) {
            Logger.getLogger(VentanaPrincipal.class.getName()).log(Level.SEVERE, null, ex);
        }
	}

	/**
	 * @param args
	 *            the command line arguments
	 */
	public static void main(String args[]) {
	}

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JDesktopPane dpPanel;
    private javax.swing.JButton jBAsignarCita;
    private javax.swing.JButton jBCrearHC;
    private javax.swing.JButton jBCrearMedicamento;
    private javax.swing.JButton jBCrearPac;
    private javax.swing.JButton jBCuentasPorPagar;
    private javax.swing.JButton jBDefuncion;
    private javax.swing.JButton jBDirectorio;
    private javax.swing.JButton jBEgreso;
    private javax.swing.JButton jBFactua;
    private javax.swing.JButton jBInventario;
    private javax.swing.JButton jBReciboCaja;
    private javax.swing.JMenuItem jItemCrearMed;
    private javax.swing.JMenuItem jItemCrearPac;
    private javax.swing.JMenuItem jItemCuentasPagar;
    private javax.swing.JMenuItem jItemDefuncion;
    private javax.swing.JMenuItem jItemDirectorio;
    private javax.swing.JMenuItem jItemReciboCaja;
    private javax.swing.JMenuItem jItemResolucion;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JButton jRResolucionDian;
    private javax.swing.JButton jbIncapacidades;
    private javax.swing.JButton jbcitas;
    private javax.swing.JButton jbgenerarReporte;
    private javax.swing.JButton jbkardex;
    private javax.swing.JButton jbverHC;
    private javax.swing.JButton jbveragenda;
    private javax.swing.JMenuBar mnuBarOncologos;
    private javax.swing.JMenu mnuCitas;
    private javax.swing.JMenuItem mnuEgresos;
    private javax.swing.JMenuItem mnuFunc;
    private javax.swing.JMenu mnuHistoriaClinica;
    private javax.swing.JMenuItem mnuIncapacidades;
    private javax.swing.JMenuItem mnuInventario;
    private javax.swing.JMenuItem mnuItemAsignarCita;
    private javax.swing.JMenuItem mnuItemBuscarCitas;
    private javax.swing.JMenuItem mnuItemCrearHistoria;
    private javax.swing.JMenuItem mnuItemFActura;
    private javax.swing.JMenuItem mnuItemProtocolo;
    private javax.swing.JMenuItem mnuItemVerHistoria;
    private javax.swing.JMenu mnuMedico;
    private javax.swing.JMenuItem mnuReportes;
    private javax.swing.JMenu mnuSecre;
    private javax.swing.JMenuItem mnuVerAgenda;
    private javax.swing.JToolBar toolBarSec;
    private javax.swing.JToolBar toolbarMedico;
    // End of variables declaration//GEN-END:variables
}
